﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Security.Cryptography;

namespace WSharp_Encrypter
{
    public partial class Form1 : Form
    {
        public string filePath = "";
        public Form1()
        {
            InitializeComponent();
        }

        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
            OpenFileDialog OpenFileWnd = new OpenFileDialog();
            OpenFileWnd.Filter = "*.ws (WSharp)|*.ws";
            if (OpenFileWnd.ShowDialog() == DialogResult.OK)
            {
                string[] filelines = File.ReadAllLines(OpenFileWnd.FileName);
                filePath = OpenFileWnd.FileName;
                txtlal.Text = "Loaded Application Lines: " + (filelines.Length + 1);
                string firstline = filelines[0].Replace("{", "");
                txtlan.Text = "Loaded Application Name: " + firstline;
                txtStatus.ForeColor = Color.Green;
                txtStatus.Text = "Ready to Encrypt!";
            }
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
        private void saveewsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string[] filelinestoenc = File.ReadAllLines(filePath);
            foreach(string line in filelinestoenc){
                
            }
        }
    }
}
